package com.chiaching.chaoxingsecondkill.config;

import com.chiaching.chaoxingsecondkill.domain.UserInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;

/**
 * @author jiajing.he
 * @date 3/26/21 2:52 PM
 */
@Component
@ConfigurationProperties("user")
@Slf4j
public class UserInfoConfig {

    private List<UserInfo> list =new ArrayList<>();


    @PostConstruct
    public void zz(){
        log.info("{}",list);
    }

    public void setList(List<UserInfo> list) {
        this.list = list;
    }

    public List<UserInfo> getList() {
        return list;
    }
}
